	.text
	.align 2
	.globl main
	.type main, @function
main:
	addi sp, sp, -96
	sd ra, 88(sp)
	sd s0, 80(sp)
	addi s0, sp, 96
.main_label_entry:
# %op0 = alloca i32
	li t0, 28
	sub t1, fp, t0
	sd t1, -24(fp)
# store i32 1, i32* %op0
	ld t1, -24(fp)
	addi t0, zero, 1
	sw t0, 0(t1)
# %op1 = alloca i32
	li t0, 44
	sub t1, fp, t0
	sd t1, -40(fp)
# %op2 = call i32 @getint()
	jal getint
	sw a0, -48(fp)
# store i32 %op2, i32* %op1
	ld t1, -40(fp)
	lw t0, -48(fp)
	sw t0, 0(t1)
# br label %label3
	j .main_label3
.main_label3:
# %op4 = load i32, i32* %op0
	ld t0, -24(fp)
	lw t0, 0(t0)
	sw t0, -52(fp)
# %op5 = icmp slt i32 %op4, 999999999
	lw t0, -52(fp)
	li t1, 999999999
	slt t0,t0,t1
	sb t0, -53(fp)
# br i1 %op5, label %label6, label %label11
	lb t1, -53(fp)
	addi t0, zero, 0
	blt t0, t1, .main_label6
	j .main_label11
.main_label6:
# %op7 = load i32, i32* %op0
	ld t0, -24(fp)
	lw t0, 0(t0)
	sw t0, -60(fp)
# %op8 = load i32, i32* %op1
	ld t0, -40(fp)
	lw t0, 0(t0)
	sw t0, -64(fp)
# %op9 = srem i32 %op7, %op8
	lw t0, -60(fp)
	lw t1, -64(fp)
	remw t2, t0, t1
	sw t2, -68(fp)
# %op10 = icmp eq i32 %op9, 0
	lw t0, -68(fp)
	addi t1, zero, 0
	slt s11,t1,t0
	slt t0,t0,t1
	or t0,t0,s11
	addi s11,zero,1
	sub  t0,s11,t0
	sb t0, -69(fp)
# br i1 %op10, label %label14, label %label17
	lb t1, -69(fp)
	addi t0, zero, 0
	blt t0, t1, .main_label14
	j .main_label17
.main_label11:
# %op12 = load i32, i32* %op1
	ld t0, -40(fp)
	lw t0, 0(t0)
	sw t0, -76(fp)
# call void @putint(i32 %op12)
	lw a0, -76(fp)
	jal putint
# %op13 = load i32, i32* %op0
	ld t0, -24(fp)
	lw t0, 0(t0)
	sw t0, -80(fp)
# ret i32 %op13
	lw a0, -80(fp)
	j main_exit
.main_label14:
# %op15 = load i32, i32* %op0
	ld t0, -24(fp)
	lw t0, 0(t0)
	sw t0, -84(fp)
# %op16 = add i32 %op15, 3
	lw t0, -84(fp)
	addi t1, zero, 3
	add t2, t0, t1
	sw t2, -88(fp)
# store i32 %op16, i32* %op0
	ld t1, -24(fp)
	lw t0, -88(fp)
	sw t0, 0(t1)
# br label %label20
	j .main_label20
.main_label17:
# %op18 = load i32, i32* %op0
	ld t0, -24(fp)
	lw t0, 0(t0)
	sw t0, -92(fp)
# %op19 = add i32 %op18, 2
	lw t0, -92(fp)
	addi t1, zero, 2
	add t2, t0, t1
	sw t2, -96(fp)
# store i32 %op19, i32* %op0
	ld t1, -24(fp)
	lw t0, -96(fp)
	sw t0, 0(t1)
# br label %label20
	j .main_label20
.main_label20:
# br label %label3
	j .main_label3
main_exit:
	# epilog
	ld ra, 88(sp)
	ld s0, 80(sp)
	addi sp, sp, 96
	jr ra
